/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-01-19
 * Time:17:24
 */
public class Animal {

        public String name;
        public int age;

        public Animal() {
        }

        public void eat() {
            System.out.println(this.name + "正在吃饭");
        }

        public void sleep() {
            System.out.println(this.name + "正在睡觉");
        }

        public void method() {
            System.out.println("这是父类的method方法");
        }

        public Animal func() {
            Dog dog = new Dog();
            return dog;
        }
    }


